package org.andao.commons.lucene.bean;

import java.io.Serializable;

import org.apache.solr.client.solrj.beans.Field;

/**
 * solr服务器索引域对象
 * 
 * @author Seewo Software - Vick.liu (liuguanglin@cvte.cn)
 * 
 */
public class BasicIndexBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2065033217873902208L;

	/**
	 * 索引key（唯一，本系统一般对应resourceid）
	 */
	@Field
	private String indexKey;

	/**
	 * 题目，搜索结果中的标题（本系统一般对应resName/teacherName/courseName...）
	 */
	@Field
	private String title;

	/**
	 * 摘要，搜索结果中的摘要
	 */
	@Field
	private String summary;

	/**
	 * 摘要，搜索结果中的摘要
	 */
	@Field
	private String remark;

	/**
	 * 备注2
	 */
	@Field
	private String addition;

	/**
	 * url，搜索结果中，点击详情要跳转到的url地址
	 */
	@Field
	private String url;

	/**
	 * logo，搜索结果中显示的logo（如果需要）
	 */
	@Field
	private String logo;

	/**
	 * 结果类型
	 * @see 该字段类型由索引建立者决定
	 */
	@Field
	private String type;

	/**
	 * 主目录
	 */
	@Field
	private String mainCatalog;

	/**
	 * 子目录
	 */
	@Field
	private String subCatalog;

	/**
	 * 作者
	 */
	@Field
	private String author;
	/**
	 * 作者ID
	 */
	@Field
	private String authorId;

	/**
	 * 创建日期
	 */
	@Field
	private String createDate;

	/**
	 * 最后更新日期
	 */
	@Field
	private String lastUpdateDate;

	/**
	 * 最后抓取日期
	 */
	@Field
	private String lastCrawlDate;

	/**
	 * 权重
	 */
	@Field
	private String weight;

	/**
	 * 浏览次数
	 */
	@Field
	private Integer visitCount;

	/************ setter and getter *******************/

	public String getIndexKey() {
		return indexKey;
	}

	public void setIndexKey(String indexKey) {
		this.indexKey = indexKey;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getAddition() {
		return addition;
	}

	public void setAddition(String addition) {
		this.addition = addition;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMainCatalog() {
		return mainCatalog;
	}

	public void setMainCatalog(String mainCatalog) {
		this.mainCatalog = mainCatalog;
	}

	public String getSubCatalog() {
		return subCatalog;
	}

	public void setSubCatalog(String subCatalog) {
		this.subCatalog = subCatalog;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getAuthorId() {
		return authorId;
	}

	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getLastUpdateDate() {
		return lastUpdateDate;
	}

	public void setLastUpdateDate(String lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	public String getLastCrawlDate() {
		return lastCrawlDate;
	}

	public void setLastCrawlDate(String lastCrawlDate) {
		this.lastCrawlDate = lastCrawlDate;
	}

	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}

	public Integer getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Integer visitCount) {
		this.visitCount = visitCount;
	}

	@Override
	public String toString() {
		return this.getIndexKey() + ":" + this.title;
	}

}
